<template>
  <!-- 订单完成页面 -->
  <div class="appointmetSuccess">
    <div class="appointmetSuccess_box">
      <!-- 图片部分 -->
      <div class="appointmetSuccess_box_image">
        <img class="image" src="../assets/Success.png" alt="" />
        <h3 class="title">Appointment Success</h3>
        <span class="text">You can check it in "My Pet" page</span>
      </div>
      <!-- 折扣部分 -->
      <div class="appointmetSuccess_box_discount">
        <!-- 获取折扣 -->
        <div class="Getdiscount">
          <img src="../assets/Coupon.png" alt="" />
          <span>Get a discount coupon</span>
        </div>
        <!-- 文段 -->
        <p class="text">
          The service can be used after completion 95% discount on all services
        </p>
        <!-- code码 -->
        <div class="code">
          <p v-if="couponInfoCode" class="code_text">
            Coupon code:{{ couponInfoCode }}
          </p>
          <!-- 暂无任何优惠卷 插槽 -->
          <p v-else class="code_text">暂无任何优惠卷</p>
        </div>
      </div>
    </div>
    <!-- 底部  结束按钮 -->
    <div class="footer_bitton">
      <van-button @click="$router.go(-1)" round size="large" color="#1ab692">Done</van-button>
    </div>
  </div>
</template>

<script setup>

const props = defineProps({
  OrderData: {
    type: Object,
    required: true,
  },
});
const { couponInfoCode, date, paymentMethod, price } = props.OrderData;


</script>

<style lang="less" scoped>
.appointmetSuccess {
  margin-top: 70px;
  .appointmetSuccess_box {
    padding: 30px 15px;

    .appointmetSuccess_box_image {
      display: flex;
      justify-content: space-between;
      align-items: center;
      flex-direction: column;
      font-size: 14px;
      color: #a6a9ac;

      .image {
        width: 110px;
        object-fit: cover;
      }
      .title {
        font-size: 24px;
        color: #000;
      }
    }
    .appointmetSuccess_box_discount {
      height: 150px;
      border-radius: 10px;
      background-color: #fff6e9;
      margin-top: 30px;
      padding: 15px;
      box-sizing: border-box;
      display: flex;
      flex-direction: column;
      align-items: center;
      .Getdiscount {
        width: 84%;
        color: #fa852a;
        font-weight: bold;
        position: relative;
        font-size: 146x;
        img {
          width: 20px;
          border-radius: 5px;
          object-fit: cover;
          position: absolute;
          left: -24px;
          top: 50%;
          transform: translateY(-50%);
        }
      }
      .text {
        width: 84%;
        font-size: 14px;
        color: #899093;
        line-height: 18px;
      }
      .code {
        width: 100%;
        padding: 12px;
        box-sizing: border-box;
        border-radius: 5px;
        background-color: #ffe6bf;
        display: flex;
        justify-content: center;
        align-items: center;
        font-weight: bold;
        font-size: 16px;
        margin-top: 15px;
      }
    }
  }
  .footer_bitton {
    position: fixed;
    width: 100%;
    background-color: #fff;
    bottom: 35px;
    padding: 5px;
    display: flex;
    justify-content: center;
    align-items: center;
    .van-button {
      width: 90%;
      font-weight: bold;
      font-size: 18px;
    }
  }
}
</style>